$(document).ready(function() {
	console.log("second ready");
	editor = new $.fn.dataTable.Editor({
// "display" : "lightbox",
		"ajaxUrl" : "promotions",
		"domTable" : "#example",
		"fields" : [{
			"label" : "Start Date",
			"name" : "START_OF_PROMOTION",
			"type" : "date",
			"dateFormat": 'd M y'
		}, {
			"label" : "End Date",
			"name" : "END_OF_PROMOTION",
			"type" : "date",
			"dateFormat": 'd M y'
		}, {
			"label" : "Action 1",
			"name" : "ACTION_OF_PROMOTION"
		}, {
			"label" : "EANs for Action 1",
			"name" : "EANS_FOR_ACTION",
			"type" : "textarea"
		}, {
			"label" : "Action 2",
			"name" : "ACTION_OF_PROMOTION"
		}, {
			"label" : "EANs for Action 2",
			"name" : "EANS_FOR_ACTION",
			"type" : "textarea"
		},{
			"label" : "Action 3",
			"name" : "ACTION_OF_PROMOTION"
		}, {
			"label" : "EANs for Action 3",
			"name" : "EANS_FOR_ACTION",
			"type" : "textarea"
		}, {
			"label" : "Extras",
			"name" : "EXTRAS",
		}, {
			"label" : "Pay off",
			"name" : "PAY_OFF",
		}]
	});

});